#define _CRT_SECURE_NO_WARNINGS 1
#include"SList.h"
void testPush()
{
	SListNode* list = NULL;
	//SListPushBack(&list, 1);
	//SListPushBack(&list, 2);
	//SListPushBack(&list, 3);
	//SListPushBack(&list, 4);
	SListPushFront(&list, 1);
	SListPushFront(&list, 2);
	SListPushFront(&list, 3);
	SListPushFront(&list, 4);
	SListPrint(list);
}
void testPop()
{

	SListNode* list = NULL;
	//SListPushBack(&list, 1);
	//SListPushBack(&list, 2);
	//SListPushBack(&list, 3);
	//SListPushBack(&list, 4);
	SListPushFront(&list, 1);
	SListPushFront(&list, 2);
	SListPushFront(&list, 3);
	SListPushFront(&list, 4);
	SListPrint(list);

	/*SListPopBack(&list);
	SListPopBack(&list);
	SListPopBack(&list);
	SListPopBack(&list);
	SListPopBack(&list);*/
	//SListPopFront(&list);
	//SListPopFront(&list);
	//SListPopFront(&list);
	//SListPopFront(&list);
	//SListPopFront(&list);
	//SListNode* find = SListFind(list, 8);
	//if (find)
	//{
	//	find->data = 22;
	//}
	//SListNode* find = SListFind(list, 8);
	//if(find)
	//SListEraseAfter(find);
	SListNode* find = SListFind(list, 1);
	//if (find)
	//{
	//	SListInsertAfter(find, 11);
	//}
	if (find)
		//SLTInsert(&list, find, 333);
		SLTErase(&list, find);
	SListPrint(list);
	SLTDestroy(&list);
}
int main()
{
	//testPush();
	testPop();
	return 0;

}